package tech.waterism.document;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.*;
import tech.waterism.dto.DateInterval;
import tech.waterism.dto.DispatchMoeaResult;
import tech.waterism.dto.ExcessQDto;
import tech.waterism.dto.TopoDataOptimizeDto;
import tech.waterism.enums.ExecuteStatusEnum;

import java.time.LocalDateTime;
import java.util.Map;

@Data
//@Document("dispatch_moea")
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@ApiModel(description = "调度优化document")
public class DispatchMoeaDocument {
    @Id
    @ApiModelProperty(value = "uuid")
    private String uuid;

    @ApiModelProperty(value = "输入数据")
    private TopoDataOptimizeDto data;

    @ApiModelProperty(value = "执行状态")
    private ExecuteStatusEnum status;

    @ApiModelProperty("错误信息")
    private String errorMessage;

    // just for test -- show result
    @ApiModelProperty("优化结果")
    private DispatchMoeaResult result;

    /**
     * 控制站点错峰期
     */
    @ApiModelProperty("控制站点错峰期")
    private Map<String, DateInterval> intervalMap;

    /**
     * 超额洪量信息
     */
    @ApiModelProperty("超额水量信息")
    private Map<Integer, ExcessQDto> excessMap;

    @CreatedBy
    @ApiModelProperty("创建者")
    private String createdBy;

    @CreatedDate
    @ApiModelProperty("创建时间")
    private LocalDateTime createdDate;

    @LastModifiedBy
    @ApiModelProperty("更新者")
    private String lastModifiedBy;

    @LastModifiedDate
    @ApiModelProperty("更新时间")
    private LocalDateTime lastModifiedDate;
}
